//
//  HNQATableViewCellTwo.m
//  JHFBaseProject
//
//  Created by 朱传正 on 2016/12/29.
//  Copyright © 2016年 好牛. All rights reserved.
//

#import "HNQATableViewCellTwo.h"

#define gap 5
#define imageWidth  (kScreen_Width - gap*4)/3

@interface HNQATableViewCellTwo ()


@property (weak, nonatomic) IBOutlet UIView *bottomView;


@end

@implementation HNQATableViewCellTwo

- (void)awakeFromNib {
    [super awakeFromNib];
    
    _cellPersonImage.layer.masksToBounds = YES;
    _cellPersonImage.layer.cornerRadius = _cellPersonImage.frame.size.width/2;

    for (int i = 0; i<3; i++) {
        if (i==0) {
            _imageView1 = [[UIImageView alloc]initWithFrame:CGRectMake((imageWidth + gap)*i + gap, 0, imageWidth, imageWidth)];
            [_imageView1 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",url_Base,_cellImageStrArr[i]]] placeholderImage:[UIImage imageNamed:@"detailImage.png"]];
            [self.cellImagesView addSubview:_imageView1];
        }else if (i==1){
            _imageView2 = [[UIImageView alloc]initWithFrame:CGRectMake((imageWidth + gap)*i + gap, 0, imageWidth, imageWidth)];
            [_imageView2 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",url_Base,_cellImageStrArr[i]]] placeholderImage:[UIImage imageNamed:@"detailImage.png"]];
            [self.cellImagesView addSubview:_imageView2];
        }else if (i==2){
            _imageView3 = [[UIImageView alloc]initWithFrame:CGRectMake((imageWidth + gap)*i + gap, 0, imageWidth, imageWidth)];
            [_imageView3 sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",url_Base,_cellImageStrArr[i]]] placeholderImage:[UIImage imageNamed:@"detailImage.png"]];
            [self.cellImagesView addSubview:_imageView3];
        }

    }
    CGRect frame = self.cellImagesView.frame;
    CGFloat heightXJ = imageWidth - frame.size.height;
    frame.size.height = imageWidth;
    self.cellImagesView.frame = frame;
    
    CGRect aFrame = self.frame;
    aFrame.size.height = aFrame.size.height + heightXJ;
    self.frame = aFrame;
    
//    CGRect bFrame = self.bottomView.frame;
//    bFrame.origin.y = bFrame.origin.y + heightXJ;
//    self.bottomView.frame = bFrame;
    
   
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

   
}

@end
